package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 db_order
 * 
 * @author ruoyi
 * @date 2025-03-22
 */
public class DbOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 购物车id */
    @Excel(name = "购物车id")
    private Long cartId;

    /** 商品id */
    @Excel(name = "商品id")
    private Long shangpinId;

    /** 商品价格 */
    @Excel(name = "商品价格")
    private Long price;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String photo;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String name;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private Long spNumber;

    /** 状态（发货/退款） */
    @Excel(name = "状态", readConverterExp = "发=货/退款")
    private String status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setCartId(Long cartId) 
    {
        this.cartId = cartId;
    }

    public Long getCartId() 
    {
        return cartId;
    }

    public void setShangpinId(Long shangpinId) 
    {
        this.shangpinId = shangpinId;
    }

    public Long getShangpinId() 
    {
        return shangpinId;
    }

    public void setPrice(Long price) 
    {
        this.price = price;
    }

    public Long getPrice() 
    {
        return price;
    }

    public void setPhoto(String photo) 
    {
        this.photo = photo;
    }

    public String getPhoto() 
    {
        return photo;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setSpNumber(Long spNumber) 
    {
        this.spNumber = spNumber;
    }

    public Long getSpNumber() 
    {
        return spNumber;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("cartId", getCartId())
            .append("shangpinId", getShangpinId())
            .append("price", getPrice())
            .append("photo", getPhoto())
            .append("name", getName())
            .append("spNumber", getSpNumber())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
